#ifndef __GDE0213B_H__
#define __GBE0213B_H__
#include "esp_common.h"
#include "espressif/esp_common.h"
#include "gpio.h"


#define EPD_POWER_PIN_0  gpio_output_set(0, BIT15, BIT15, 0)
#define EPD_POWER_PIN_1  gpio_output_set(BIT15, 0, BIT15, 0)

#define EPD_W21_MOSI_0	gpio_output_set(0, BIT14, BIT14, 0)
#define EPD_W21_MOSI_1	gpio_output_set(BIT14, 0, BIT14, 0)

#define EPD_W21_CLK_0	gpio_output_set(0, BIT13, BIT13, 0)
#define EPD_W21_CLK_1	gpio_output_set(BIT13, 0, BIT13, 0)

#define EPD_W21_CS_0	gpio_output_set(0, BIT4, BIT4, 0)
#define EPD_W21_CS_1	gpio_output_set(BIT4, 0, BIT4, 0)

#define EPD_W21_DC_0	gpio_output_set(0, BIT12, BIT12, 0)
#define EPD_W21_DC_1	gpio_output_set(BIT12, 0, BIT12, 0)

#define EPD_W21_RST_0	gpio_output_set(0, BIT2, BIT2, 0)
#define EPD_W21_RST_1	gpio_output_set(BIT2, 0, BIT2, 0)

#define EPD_W21_BUSY_LEVEL 0   //忙检测状态

#define isEPD_W21_BUSY (GPIO_INPUT_GET(GPIO_ID_PIN(5))) //忙检测引脚

void SPI_Write(unsigned char value);
void driver_delay_xms(unsigned long xms);
void epd_show_update(u8_t mode,u8_t clear,u8_t *data1,u8_t *data2);
void epd_update_hint(u8_t *data);
void epd_show_init(void);
void epd_update_progress(u8_t value);
void epd_module_close(void);
void epd_bat_alarm_hint(u8_t *data);
void epd_csq_alarm_hint(u8_t *data);
void epd_sim_alarm_hint(u8_t *data);
void epd_tcp_alarm_hint(u8_t *data);
void epd_noneSIM_alarm_hint(u8_t *data);


#endif
